<include file="__THEME__/header" />
<include file="__THEME__/editor" />

<div class="content"><!-- 内容 begin  -->   
  
    <div class="mainbox">
     <form id="form1" name="form1" method="post" action="{:U('center/myqiugou/dochekall')}" enctype="multipart/form-data">
      <div class="mainbox_R"> 
          
        <div class="right_box">
          <ul class="topic_list" rel="followTopicArea">
          <php>if($act=='add'){</php>
               <li><h2>城市:</h2></li>
              <li> 
			 <script>ui.getarea('area','',{$userinfo.province},{$userinfo.city});</script>
							  
		       </li>
               <li><h2>学校:</h2></li>
              <li> <input type="text" name="school" id="selectschool"   value="{$userinfo['school']}" class="text" readonly/>
              <input type="button" class="btn_b" value="选择学校" onclick="selectSchool()" />
                     <input type="hidden" id="current" name="areaid" value="{$userInfo.araeid}" />
              </li>
              <php>}else{</php>
               <li><h2>城市:</h2></li>
              <li>  <script>ui.getarea('area','',{$goods.province},{$goods.city});</script></li>
               <li><h2>学校:</h2></li>
              <li> <input type="text" name="school" id="selectschool"   value="{$goods['school']}" class="text" readonly/>
              <input type="button" class="btn_b" value="选择学校" onclick="selectSchool()" />
                     <input type="hidden" id="current" name="areaid" value="{$userInfo.araeid}" /></li>
              <php>}</php>
          </ul>
        </div>
      </div>
      <div class="mainbox_CR">
      <div style="overflow:hidden;">
      
            <div class="tab-menu"><!-- 切换标签 begin  -->
              <ul>
                <li><a id="feed_colleague_item" rel="colleague" class="feed_item" href="{:U('center/Myqiugou/index')}"><span>商品列表</span></a></li>
				
                <li><equal name="act" value="edit" ><a id="feed_all_item" rel="all" class="on feed_item" href="{:U('center/Myshop/add')}"><span>编辑商品</span></a>
                <else/><a id="feed_all_item" rel="all" class="on feed_item" href="{:U('center/Myqiugou/add')}"><span>发布新商品</span></a></equal></li>
              
              </ul>
            </div>
            
          <switch name="ACTION_NAME">
          <case value="atme">
            <div class="tab-menu">
              <ul>
                <li><a href="###" class="on"><span>提到我的</span></a></li>
              </ul>
            </div>
          </case>
          <case value="collection">
            <div class="tab-menu">
              <ul>
                <li><a href="###" class="on"><span>我收藏的</span></a></li>
              </ul>
            </div>
          </case>
        </switch>
        </div>
       
        <div class="feedBox">

 <input  type="hidden" name="id" value="{$goods[id]}"/>
 <ul class="feed_list">
   <li><div class="f16px">标 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;题：
    <input  type="text" name="title" id="title" value="{$goods[title]}" class="title35"  onfocus="this.className='title35on'" onblur="this.className='title35'"/></div></li>
     <li><div class="f16px"> 商品名称：
   <input  type="text" name="name" id="name" value="{$goods[gname]}" class="text35"  onfocus="this.className='text35on'" onblur="this.className='text35'" /></div></li>
     <li><div class="f16px"> 商品数量：
     <input  type="text" name="number" id="number" value="{$goods[gnumber]}"  class="text35"  onfocus="this.className='text35on'" onblur="this.className='text35'" /></div></li>
    <li> <div class="f16px">商品单价：
     <input  type="text" name="price" id="price" value="{$goods[gprice]}"  class="text35"  onfocus="this.className='text35on'" onblur="this.className='text35'" /></div></li>
    <li> <div class="f16px"> 商品类型：
     <select name="type" id="type" class="text35" onfocus="this.className='text35on'" onblur="this.className='text35'" >
     <volist name="goodstype" id="type">
     <option <eq name="type.id" value="$goods['gtype']" >selected</eq> value="{$type[id]}">{$type['name']}</option>
     </volist>
     </select></div></li>
   
   <div>
     <php>if ($goods[gimage]) {</php>
    <img src="__UPLOAD__/goods/s_{$goods[gimage]}"><php>}</php>
    </div>
    <br/> </ul>
   <div class="f16px">商品详细：</div>
    
    <div> <textarea name="details"  id="details" style="width:700px;height:350px">{$goods['gdetails']}</textarea></div>
 <br/>
     <input type="submit" name="button" id="button" value="" class="btn_big"  style="margin:2px 5px 0 0;" onclick="docheckall()"/>


        </div>
      </div>
       </form>
    </div>
  
</div>
 
<!-- 内容 end --> 
<!-- 在线编辑器 bigen-->
 <script>
$(document).ready(function(){
loadEditor("details");
});
</script> 
<!-- 在线编辑器 end-->
<!--弹出层 选择 学校 begin-->
<script>
function selectSchool(){
    var typevalue = $("#current").val();
    ui.box.load(U('home/School/school')+'&selected='+typevalue,{title:'选择所在学校'});
}
</script>
<!--弹出层 选择学校 end-->


<!-- 用@提到的人 begin-->
<div class="atwho" id="searchUser" style="display:none;">
  <dl>
    
    <!--
                <dd class="ucr">张小小</dd>
                <dd>张大妮</dd>
                <dd>冷大少</dd>
				-->
    
  </dl>
</div>
<!-- 用@提到的人 end --> 


<include file="__THEME__/footer" /> 